package com.jf.blogbackened.mapper;

import com.jf.blogbackened.bean.Article;
import com.jf.blogbackened.bean.vo.ArticleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author David
 */
@Mapper
public interface ArticleMapper {
    List<ArticleVO> getRecentArticles();

    Integer getCount(Article article);

    List<ArticleVO> getPageData(@Param("article") Article article, @Param("offset") Integer offset, @Param("pageSize") Integer pageSize);

    Integer insert(Article article);

    Article getArticlesById(Integer id);

    Integer update(Article article);

    Integer delArticleById(Integer id);

    Integer delArticleByUserId(Integer id);

    Integer delArticleByCategoryId(Integer id);
}
